<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no">
  <meta http-equiv="X-UA-Compatible" content="ie=edge">
  <title>比赛规则</title>
  <link rel="stylesheet" href="./css/public.css">
  <link rel="stylesheet" href="./css/gamerules.css">
</head>
<body>
  <div id="app">
    <div id="rules">
        <h1 ref="title">{{name}}规则</h1>
        <a class="return" href="./">返回 》</a>
        <ul class="rule_select">
          <li class="select_item" v-for="item in selectRules" :key="item.name">
            <div class="rule_each" v-bind:class="{specialRule: item.name == '特殊规则'}">
              <span class="ruleTitle">{{item.name}}：</span>
              <ul>
                <li class="rulename" v-for="rule in item.ruleContent" :key="rule.name" @click="showDesc(rule.rules, $event)">{{rule.name}}</li>
              </ul>
            </div>
            <p class="select_rules">
              <span class="triangle"></span>
              {{ruleContent}}</p>
          </li>
        </ul>
        <ul class="rule_text">
          <li class="select_item" v-for="item in textRules" :key="item.name">
            <div class="text_each">
              <span class="ruleTitle text_title" @click="textClick"><i class="text_triangle"></i>{{item.name}}</span>
            </div>
            <ul class="text_content select_rules">
              <li class="text_rules" v-for="(rule, index) in item.rules" :key="rule">{{index+1}}、{{rule}}</li>
            </ul>
          </li>
        </ul>
      </div>
  </div>
  <script src="https://cdn.bootcss.com/vue/2.5.9/vue.js"></script>
  <script src="https://unpkg.com/axios/dist/axios.min.js"></script>
  <script src="./js/gamerules.js"></script>
</body>
</html>
